<style>
	@import url('../static/css/ranking.css');
</style>

<template>
	<view>
		<!-- 公共头部 -->
		<view> <my-header :title="'排行榜'" :lefticon="'left'"></my-header></view>
		<!-- 排行榜 -->
		<view class="content">


			<view class="top_image">
				<image src="https://www.iiscchina.com/wp-content/uploads/2023/07/rank_img.png" mode='widthFix'></image>
			</view>

			<view class="data_main data_number_left">
				本季参与用户：
				<text   v-for="(item,index) in makeUserCount" >{{item}}</text> 人
			</view>


			<view class="scroll_">
				<view class="scroll_view_content">
					<view class="rank_my_row rank_my_row_new">
						<view class="one-sty xl_rank_title">{{selectvalue}}</view>
						<uni-data-picker  class="btn-sty"  v-model="classes"   ref="class"  :localdata="items" popup-title="切换榜单"  placeholder="切换榜单"  @change="onchange" @nodeclick="onnodeclick"></uni-data-picker>
					</view>
				</view>
			</view>
			<view class="rank_my_row xl_table_row" v-if="mylist">
				<view>
					<image class="rank_my_img  marginleft30 floatleft" :src="mylist.user_img"></image>
					<text class="floatleft">{{mylist.nickname}}</text>
				</view>
				<view>第{{mylist.ranking}}名</view>
				<view>{{mylist.allscore}}分</view>
			</view>
			<!-- 排行榜 -->
			<view>
				<view>
					<view class="table">
						<!-- 表头行 -->
						<view class="th top">
							<view align="center">排名</view>
							<view align="center">用户</view>
							<view align="center">ID</view>
							<view align="center">得分</view>
						</view>
						<!-- 表格数据行 -->
						<view class="td"  v-for="(item,index) in userlist"   v-if="userlist.length>0">
							<view align="center">{{item.ranking}}</view>
							<view align="center">{{item.nickname}}</view>
							<view align="center">{{ parseInt(item.id) + parseInt(10000000)}}</view>
							<view align="center">{{item.allscore}}</view>
						</view>
						<view class="nodata" v-else>暂无数据</view>
					</view>
				</view>
			</view>
		</view>
		<view>
			<Tabbar :current="'1'"></Tabbar>
		</view>
	</view>
</template>

<script type="module" src="../static/js/ranking.js"></script>